<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="org.lanqiao.dxzf.entity.ResultBill"%>
<%@page import="org.lanqiao.dxzf.entity.Page"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link type="text/css" rel="stylesheet" media="all"
	href="${pageContext.request.contextPath}/css/global.css" />
<link type="text/css" rel="stylesheet" media="all"
	href="${pageContext.request.contextPath}/css/global_color.css" />
<script type="text/javascript">
        function goPage(page){
        	location.href="bill_service_detail.do?currentPage="+page;
        	}
</script>
</head>
<body onload="initialYearAndMonth();">
	<!--Logo区域开始-->
	<%@include file="../include/header.jsp"%>
	<!--导航区域结束-->
	<!--主要区域开始-->
	<div id="main">
		<form id="billDetailForm"
			action="${pageContext.request.contextPath }/bill/detail.action"
			method="get">
			<input type="hidden" name="ite_id" id="item" />
			<!--查询-->
			<div class="search_add">
				<div>
					账务账号:<span class="readonly width100">${lib.bid}</span>
				</div>
				<div>
					身份证:<span class="readonly width150">${lib.cidcard}</span>
				</div>
				<div>
					姓名:<span class="readonly width100">${lib.cname}</span>
				</div>
				<div>
					计费时间:<span class="readonly width100"><fmt:formatDate
							value="${lib.b_month}" pattern="yyyy年MM月" /></span>
				</div>
				<div>
					总费用：<span class="readonly width70">${lib.b_price}</span>
				</div>
				<input type="button" value="返回" class="btn_add"
					onclick="location.href ='${pageContext.request.contextPath}/bill_list.do?bill_id=${lib.bid}';" />
			</div>
			<!--数据区域：用表格展示数据-->
			<div id="data">
				<table id="datalist">
					<tr>
						<th class="width70">账单明细ID</th>
						<th class="width150">OS 账号</th>
						<th class="width150">服务器 IP</th>
						<th class="width70">账务账号ID</th>
						<th class="width150">时长</th>
						<th>费用</th>
						<th class="width150">资费</th>
						<th class="width50"></th>
					</tr>
					<c:forEach items="${item.dataList}" var="bi">
						<tr>
							<td>${bi.rid}</td>
							<td>${bi.os_account}</td>
							<td>${bi.server_ip}</td>
							<td>${bi.report_id}</td>
							<td>${bi.duration}</td>
							<td>${bi.c_price}</td>
							<td>${bi.fname}</td>
							<td><a
								href="${pageContext.request.contextPath }/bill_service_detail.do?bid=${bl.rid}"
								title="业务详单">详单</a></td>
						</tr>
					</c:forEach>
				</table>
			</div>
			<!--分页-->
			<div id="pages">
				<div style="text-align: center; margin-top: 40px" id="venderfen">
					当前第${paging.currentPage }页/共${paging.totalPage }页
					<c:choose>
						<c:when test="${paging.currentPage==1&&paging.totalPage==0}">

						</c:when>
						<c:when test="${paging.currentPage==1&&paging.totalPage==1}">

						</c:when>
						<c:when test="${paging.currentPage==2&&paging.totalPage==2}">
							<input type="button" value="首页" onclick="goPage(1)" />
							<input type="button" value="上一页"
								onclick="goPage(${paging.currentPage-1})" />
						</c:when>
						<c:when test="${paging.currentPage==1 }">
							<input type="button" value="上一页"> <input type="button"
								value="下一页" onclick="goPage(${paging.currentPage+1})" /> <input
								type="button" value="末页" onclick="goPage(${paging.totalPage})" />
						</c:when>
						<c:when test="${paging.currentPage==paging.totalPage }">
							<input type="button" value="首页" onclick="goPage(1)" />
							<input type="button" value="上一页"
								onclick="goPage(${paging.currentPage-1})" />
						</c:when>
						<c:otherwise>
							<input type="button" value="首页" onclick="goPage(1)" />
							<input type="button" value="上一页"
								onclick="goPage(${paging.currentPage-1})" />
							<input type="button" value="下一页"
								onclick="goPage(${paging.currentPage+1})" />
							<input type="button" value="末页"
								onclick="goPage(${paging.totalPage})" />
						</c:otherwise>
					</c:choose>

				</div>
		</form>
	</div>
	<!--主要区域结束-->
	<div id="footer"></div>
	<script type="text/javascript" language="javascript">
        //根据权限显示信息
        var listPrivs = "${sessionScope.listPrivs}";
        for(var p of listPrivs){
        if(p=="1")  {document.getElementById("p1").style.display="block";}
        if(p=="2")  {document.getElementById("p2").style.display="block";}
        if(p=="3")	{document.getElementById("p3").style.display="block";}
        if(p=="4")	{document.getElementById("p4").style.display="block";}
        if(p=="5")	{document.getElementById("p5").style.display="block";}
        if(p=="6")	{document.getElementById("p6").style.display="block";}
        if(p=="7")	{document.getElementById("p7").style.display="block";}
        }
        </script>
</body>
</html>
